3.191 \(\int \cos (c+d x) \sin (c+d x) (a+a \sin (c+d x)) \, dx\)

Optimal. Leaf size=33 \[ \frac {a \sin ^3(c+d x)}{3 d}+\frac {a \sin ^2(c+d x)}{2 d} \]

[Out]

1/2*a*sin(d*x+c)^2/d+1/3*a*sin(d*x+c)^3/d

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 33, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {2833, 12, 43} \[ \frac {a \sin ^3(c+d x)}{3 d}+\frac {a \sin ^2(c+d x)}{2 d} \]

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]*Sin[c + d*x]*(a + a*Sin[c + d*x]),x]

[Out]

(a*Sin[c + d*x]^2)/(2*d) + (a*Sin[c + d*x]^3)/(3*d)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2833

Int[cos[(e_.) + (f_.)*(x_)]*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)
])^(n_.), x_Symbol] :> Dist[1/(b*f), Subst[Int[(a + x)^m*(c + (d*x)/b)^n, x], x, b*Sin[e + f*x]], x] /; FreeQ[
{a, b, c, d, e, f, m, n}, x]

Rubi steps

\begin {align*} \int \cos (c+d x) \sin (c+d x) (a+a \sin (c+d x)) \, dx &=\frac {\operatorname {Subst}\left (\int \frac {x (a+x)}{a} \, dx,x,a \sin (c+d x)\right )}{a d}\\ &=\frac {\operatorname {Subst}(\int x (a+x) \, dx,x,a \sin (c+d x))}{a^2 d}\\ &=\frac {\operatorname {Subst}\left (\int \left (a x+x^2\right ) \, dx,x,a \sin (c+d x)\right )}{a^2 d}\\ &=\frac {a \sin ^2(c+d x)}{2 d}+\frac {a \sin ^3(c+d x)}{3 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.09, size = 30, normalized size = 0.91 \[ \frac {4 a \sin ^3(c+d x)-3 a \cos (2 (c+d x))}{12 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]*Sin[c + d*x]*(a + a*Sin[c + d*x]),x]

[Out]

(-3*a*Cos[2*(c + d*x)] + 4*a*Sin[c + d*x]^3)/(12*d)

________________________________________________________________________________________

fricas [A]  time = 0.48, size = 39, normalized size = 1.18 \[ -\frac {3 \, a \cos \left (d x + c\right )^{2} + 2 \, {\left (a \cos \left (d x + c\right )^{2} - a\right )} \sin \left (d x + c\right )}{6 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*sin(d*x+c)*(a+a*sin(d*x+c)),x, algorithm="fricas")

[Out]

-1/6*(3*a*cos(d*x + c)^2 + 2*(a*cos(d*x + c)^2 - a)*sin(d*x + c))/d

________________________________________________________________________________________

giac [A]  time = 0.15, size = 28, normalized size = 0.85 \[ \frac {2 \, a \sin \left (d x + c\right )^{3} + 3 \, a \sin \left (d x + c\right )^{2}}{6 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*sin(d*x+c)*(a+a*sin(d*x+c)),x, algorithm="giac")

[Out]

1/6*(2*a*sin(d*x + c)^3 + 3*a*sin(d*x + c)^2)/d

________________________________________________________________________________________

maple [A]  time = 0.05, size = 28, normalized size = 0.85 \[ \frac {\frac {\left (\sin ^{3}\left (d x +c \right )\right ) a}{3}+\frac {\left (\sin ^{2}\left (d x +c \right )\right ) a}{2}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)*sin(d*x+c)*(a+a*sin(d*x+c)),x)

[Out]

1/d*(1/3*sin(d*x+c)^3*a+1/2*sin(d*x+c)^2*a)

________________________________________________________________________________________

maxima [A]  time = 0.31, size = 28, normalized size = 0.85 \[ \frac {2 \, a \sin \left (d x + c\right )^{3} + 3 \, a \sin \left (d x + c\right )^{2}}{6 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*sin(d*x+c)*(a+a*sin(d*x+c)),x, algorithm="maxima")

[Out]

1/6*(2*a*sin(d*x + c)^3 + 3*a*sin(d*x + c)^2)/d

________________________________________________________________________________________

mupad [B]  time = 0.04, size = 24, normalized size = 0.73 \[ \frac {a\,{\sin \left (c+d\,x\right )}^2\,\left (2\,\sin \left (c+d\,x\right )+3\right )}{6\,d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(c + d*x)*sin(c + d*x)*(a + a*sin(c + d*x)),x)

[Out]

(a*sin(c + d*x)^2*(2*sin(c + d*x) + 3))/(6*d)

________________________________________________________________________________________

sympy [A]  time = 0.56, size = 41, normalized size = 1.24 \[ \begin {cases} \frac {a \sin ^{3}{\left (c + d x \right )}}{3 d} + \frac {a \sin ^{2}{\left (c + d x \right )}}{2 d} & \text {for}\: d \neq 0 \\x \left (a \sin {\relax (c )} + a\right ) \sin {\relax (c )} \cos {\relax (c )} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*sin(d*x+c)*(a+a*sin(d*x+c)),x)

[Out]

Piecewise((a*sin(c + d*x)**3/(3*d) + a*sin(c + d*x)**2/(2*d), Ne(d, 0)), (x*(a*sin(c) + a)*sin(c)*cos(c), True
))

________________________________________________________________________________________